package com.alibaba.demo.dto.domainevent;

import lombok.Getter;

import java.io.Serializable;
import java.util.Date;
import java.util.UUID;

/**
 * @author Administrator
 * @date 2024/4/26 11:10
 * @description
 */
@Getter
public abstract class DomainEvent implements Serializable {
    private final String id;
    private final Date createTime;

    public DomainEvent() {
        this.id = UUID.randomUUID().toString();
        this.createTime = new Date();
    }
}
